#######################################################################
#							              # 
#                          News Publisher                             #
#                        Single Story Viewer 	                      #
#		   	     Version 1.04                             #
# 	                                                              #
#                    Created by Grant Williams                        # 
#					                              #
# Created on:  3/27/99          Last Modified on:  3/31/99            #
# I can be reached at:          gcw07@ionet.net                       #
# Scripts Found at:             http://www.roosh.com/news_publisher/  #
#######################################################################
# Please use the forum at the site for support questions and not      #
# email them. The forum is checked often.			      #
#######################################################################
# COPYRIGHT NOTICE:						      #
# 								      #
# Copyright 1999 Grant Williams    All Rights Reserved.               #
#								      #
# This program may be used and modified free of charge by anyone, as  #
# long as this copyright notice and the header above remain intact.   #  
# By using this program you agree to indemnify Grant Williams from    #
# any liability that might arise from it's use.                       #
#								      #
# Selling the code for this program without prior written consent is  #
# expressly forbidden. Obtain permission before redistributing this   #
# software over the Internet or in any other medium.  In all cases    #
# copyright and header must remain intact.                            #
#                                                                     #
#######################################################################

____________________________________________________________________________


You will also need to edit the viewnews.cgi file to install to this script.
Below is a description of how to modify the necessary file. This script
is an add-on and is not required to run the news.cgi script.

_________________________________________________________________________

                   CONFIG.CGI SINGLE STORY VIEWER CONFIGURATION
		  =============================================

This file must be placed in your server's cgi-bin, or if your server has 
.cgi extensions allowed, you can simply rename this file to config.cgi. This
file must be chmoded 755. Ask your system administrator for more information 
on either the cgi-bin or chmod command.

This file will be pretty easy to modify, if you already modified the 
config.cgi file for the news script. Below is a summary of how to configure 
all of the variables:

###########################################################################
# Define Variables


   ############  OTHER CONFIGURATION PART ############

$pageheader = "/path/to/datadirectory/pageheader.txt";
	This is the HTML that you want before the news story. So you
	can place any HTML in this file. All of it will show up above the
	single news story.

$pagefooter = "/path/to/datadirectory/pagefooter.txt";
	This is the HTML that you want after the news story. So you
	can place any HTML in this file. All of it will show up below the
	single news story.

$seperator =  "<hr>";
	This is the html you want to seperate the news story from the headlines
	underneath when viewing a story.

$print_headlines = 1;  # 1 = Yes; 2 = No;
	This is if you want to print the headlines after the story. If it is set to 
	1, it will show them, if it is set to 2, it won't.

##########################################################################


The CGI is now ready to upload. Now onto the second part of configuration.
You must also configure the viewnews.cgi script, but it is very easy.

First make sure the perl location at the top is correct. Then scroll down to
these lines:

require "config.cgi";
require "np-lib.cgi";

If you did not rename config.cgi or np-lib.cgi to anything else you do not 
have to change anything. If you did rename either change the name so that it 
points to the config.cgi and np-lib.cgi files. This file must be placed in your 
server's cgi-bin, like the config.cgi script was, or if your server has .cgi 
extensions allowed, you can simply rename this file to viewnews.cgi. This file 
must be chmoded 755. Ask your system administrator for more information on either 
the cgi-bin or chmod command.

############################################################################

Thats it for the variables. Save it, and upload it. Once upload chmod it
755. Now there are a few other things you need to change. Run the news.cgi
script. Login with the admin and goto the configuration. Scroll down to the
'How do you want the headlines of the stories to look?' option in the 
headlines options. In this field change the following:

	http://www.roosh.com/index.shtml#<<id>> 

the link needs to be changed to:

	http://www.roosh.com/cgi-bin/viewnews.cgi?id=<<id>>

If you are using the categories option, the links need to be like this:

	http://www.roosh.com/cgi-bin/viewnews.cgi?category=1&id=<<id>>

If you don't specify the category number it will default to 1. Check the Category 
Options page for the category numbers. If you wish to use the 'special' all category
replace the category number with 'all'.

Make sure it points to the viewnews.cgi script. So if you renamed it to .pl
reflect that change in the url. Now set the configuration. Then select 
'Update News File' from the menu to update the news file. Now when you call 
the SSI headlines it will link to the single news story script and show only 
one story when clicked upon. Hopefully this will help people who have long 
stories and wanted this.

------------------------------------------------------------------------

If I missed anything please let me know in the forum at my site. Thanks.